﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcControlsToolkit
{
    public class GridOptions: BaseObject
    {
        public bool DrawBorder
        {
            get
            {
                if (Attributes.ContainsKey("drawBorder"))
                    return Boolean.Parse(GetString("drawBorder"));
                else
                    return true;
            }

            set
            {
                Attributes["drawBorder"] = value.ToString().ToLower();
            }
        }

        public bool DrawGridlines
        {
            get
            {
                if (Attributes.ContainsKey("drawGridlines"))
                    return Boolean.Parse(GetString("drawGridlines"));
                else
                    return true;
            }

            set
            {
                Attributes["drawGridlines"] = value.ToString().ToLower();
            }
        }

        public bool Shadow
        {
            get
            {
                if (Attributes.ContainsKey("shadow"))
                    return Boolean.Parse(GetString("shadow"));
                else
                    return true;
            }

            set
            {
                Attributes["shadow"] = value.ToString().ToLower();
            }
        }

        public string Background{
            get
            {
                return GetString("background");
            }
            set{
                SetString("background", value);
            }
        }                    
    }
}
